import java.util.ArrayList;

public class Thief extends Piece {
	/*
	 * 8   - x - - - - - - - x - -    
	 * 7   - - x - - - - - x - - -    
	 * 6   - - - x - - - x - - - -    
	 * 5   - - - - x - x - - - - -    
	 * 4   - - - - - T - - - - - -      EARTH (2)
	 * 3   - - - - x - x - - - - -    
	 * 2   - - - x - - - x - - - -    
	 * 1   - - x - - - - - x - - -    
	 * 	   a b c d e f g h i j k l
	 * 
	 * Thief stays on the EarthBoard. It moves like a bishop in regular chess.
	 */
	
	public Thief(int s) {
		super(s);
	}

	protected ArrayList<Square> getAvailableMoves() {
		moves.clear();
		for(int i = 0; i < 4; i++) {
			for(int j = 1; j < 8; j++) {
				moves.add(getSquare().getFarSquare(Square.NORTHEAST + 90 * i, j));
				if(moves.get(moves.size() - 1).isOccupied()) {
					j += 8;
				}
			}
		}
		System.out.println(moves);
		return moves;
	}
	
	protected ArrayList<Square> getAvailableCapts() {
		return getAvailableMoves();
	}
	
	public String toString() {
		if(side == 1) {
			return "T";
		} else if(side == 2) {
			return "t";
		} else {
			return "no side";
		}
	}
}
